package cn.chendd.example.jpa.base;

import org.springframework.data.jpa.repository.support.JpaEntityInformation;
import org.springframework.data.jpa.repository.support.SimpleJpaRepository;

import javax.persistence.EntityManager;
import java.io.Serializable;

/**
 * BaseRepositoryImpl
 *
 * @author chendd
 * @date 2020/4/21 20:58
 */
public class BaseRepositoryImpl<T , ID extends Serializable> extends SimpleJpaRepository<T , ID> implements BaseRepository<T , ID> {

    protected EntityManager entityManager;

    public BaseRepositoryImpl(JpaEntityInformation<T, ?> entityInformation, EntityManager entityManager) {
        super(entityInformation, entityManager);
        this.entityManager = entityManager;
    }

    public BaseRepositoryImpl(Class<T> domainClass, EntityManager entityManager) {
        super(domainClass, entityManager);
    }

}
